var FeedCollection = Backbone.Collection.extend({
	model: FeedItem,
	
	initialize: function () {
		// something
	},
	
	parse: function(response) {
		var feed = _.map(response, ParseFeedItem);
		return feed;
	},
	
	removeAll: function() {
		this.models.splice(0, this.models.length);
	},

    // comparator: function (dish) {
      // return dish.get('order');
    // }

});



var PhotoCollection = Backbone.Collection.extend({
	model: Photo,
	
	initialize: function () {
		// something
	},
	
	parse: function(response) {
		// use JSON returned by django view to construct a dish object
		var photos = _.map(response, ParsePhoto);
		return photos;
	},
	
	removeAll: function() {
		this.models.splice(0, this.models.length);
	},

    // comparator: function (dish) {
      // return dish.get('order');
    // }

});


var DishCollection = Backbone.Collection.extend({
	model: Dish,
	
	initialize: function () {
		// something
	},
	
	parse: function(response) {
		// use JSON returned by django view to construct a dish object
		var dishes = _.map(response, ParseDishes);
		return dishes;
	},
	
	removeAll: function() {
		this.each(function (m) { m.marker.setMap(null); });
		this.models.splice(0, this.models.length);
		
	},

    // comparator: function (dish) {
      // return dish.get('order');
    // }

});



var ReviewCollection = Backbone.Collection.extend({
	model: Review,
	
	initialize: function () {
		// something
	},
	
	parse: function(response) {
		// use JSON returned by django view to construct a review object
		var reviews = _.map(response, ParseReviews);
		return reviews;
	},
	
	removeAll: function() {
		this.models.splice(0, this.models.length);
	},
});
